using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Forms;

using Utilities;

namespace FORUs
{
    static class Program
    {
        public static string SongDirectory;
        public static string PlaylistDirectory;

        public static IniFile ConfigurationFile;
        
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            string directory = Application.ExecutablePath.Substring(0, Application.ExecutablePath.LastIndexOf('\\') + 1);

            ConfigurationFile = new IniFile(string.Concat(directory, "config.ini"));

            SongDirectory = ConfigurationFile.GetString("SONGS", "DIRECTORY", "");
            if (SongDirectory.Equals(""))
                SongDirectory = string.Concat(directory, "Songs");

            PlaylistDirectory = ConfigurationFile.GetString("PLAYLISTS", "DIRECTORY", "");
            if (PlaylistDirectory.Equals(""))
                PlaylistDirectory = string.Concat(directory, "Playlits");

            Application.Run(new Frm03_MainScreen());
        }
    }
}